# 对象库基类
from selenium.webdriver.support.wait import WebDriverWait

from V6.utils import UtilsDriver


class BasePage:
    def __init__(self):
        self.driver=UtilsDriver().get_driver()

    def get_element(self,location):
        wait=WebDriverWait(self.driver,10,1)
        element=wait.until(lambda x :x.find_element(*location))

        return element

# 操作基类
class BaseHandle:
    def input_text(self,element,text):
        element.clear()
        element.send_keys(text)